import Vue from 'vue'
import VueRouter from 'vue-router'
import Index from '@/view/Index.vue'
import AdminLayout from '@/layout/AdminLayout.vue'
import LoginLayout from '@/layout/LoginLayout.vue'
import Login from '../view/Login.vue'

Vue.use(VueRouter)
const router = new VueRouter({
    routes: [{
            path: '/',
            redirect: '/index'
        },
        {
            path: '/index',
            component: AdminLayout,
            children: [{
                path:'',
                component:Index
            }]
        },
        {
            path:'/login',
            component:LoginLayout,
            children:[
                {
                    path:'',
                    component:Login
                }
            ]
        }
    ]
})
export default router;